<?php
require_once "../libs/ttServer.php";

$tt = new ttServer();
$id = secureGET("id");
$data = $tt->mblog_get($id);

/* 输出页面 */
echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>';
echo '<meta http-equiv="Pragma" content="no-cache"/>';
echo '<meta http-equiv="Cache-Control" content="no-cache"/>';
echo '<meta http-equiv="Expires" content="0"/>';
echo '<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />';

//echo '<link href="mblog_style.css" rel="stylesheet" type="text/css" />';
if($data && $data[0])
{
	echo  '<title>'. $data[0]['title'] . ' - miniblog - 游味</title>';
}
else
{
	echo '<title>miniblog - 游味</title>';
}
echo '</head>';

echo '<body>';

if($data)
{	
	if($data[0])
	{
		// title
		echo '<h1>';
		echo $data[0]['title'];
		echo '</h1>';
		
		// author
		echo '<h4>';
		echo '感谢'. $data[0]['author'] .'的投递';
		echo '</h4>';
		
		echo '<br /><br />';
		
		// content
		echo '<div id="content">';
		echo '<p>';
		echo $data[0]['content'];
		echo '</p>';
		echo '</div>';
		
		echo '<br /><br />';
	// navigation
		echo '<div id="next">';	
		if ($data[1]){		
			echo sprintf('<div>下篇：<a href="index.php?id=%d">%s</a></div>',$data[1]['id'], $data[1]['title']);
			echo sprintf('<div>回到：<a href="dir.php">目录</a></div>');
			echo '<br />我要：<a href="add.php">投递一篇</a>';
		}else{
			echo sprintf('<div>没有下一篇了</div>');
			echo sprintf('<div>回到：<a href="dir.php">目录</a></div>');			
			echo '<br />我要：<a href="add.php">贡献一篇</a>';
		}
		echo '</div>';		
	}
}
else
{
	echo '<p>';	
	echo '错误的id号,回<a href="index.php">首页</a>';
	echo '</p>';
}

// footer
echo '<br /><br />';
echo '<div id="footer">';
echo '游味作品. 版权所有 @2010';
echo '</div>';

echo '</body>';
echo '</html>';



?>
<script src="http://s14.cnzz.com/stat.php?id=2246917&web_id=2246917&show=pic1" language="JavaScript"></script>